<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="zhcms.admin.*" %> 
<%@ page import="zhcms.framework.*" %> 
<%@ page import="zhcms.tool.*" %> 
<jsp:useBean id="fileBean" scope="page" class="zhcms.tool.UploadBean" />
<%
request.setCharacterEncoding("utf-8");
String err="";
String msg="";
String TureObjectPath="/data/java/gyHuangye/WebRoot/upload/";
String VirtualObjectPath="/upload/";
fileBean.setObjectPath(TureObjectPath);
fileBean.setSize(10000*1024);
fileBean.setSuffix(".gif.jpg.png.jpge.html.htm.rar.zip");
fileBean.setSourceFile(request);
String [] saSourceFile = fileBean.getSourceFile();
String [] saObjectFile = fileBean.getObjectFileName();
String [] saDescription = fileBean.getDescription();
int iCount = fileBean.getCount();
String sObjectPath = fileBean.getObjectPath();
//out.println("<br>源始文件:");
//out.println(saSourceFile[0]);
//out.println("<br>目标文件:");
//out.println(sObjectPath+saObjectFile[0]);
//out.println("<br>上传说明:");
//out.println(saDescription[0]);
GyString gys=new GyString();
msg="{'url':'"+VirtualObjectPath + saObjectFile[0]+"','localname':'"+saSourceFile[0]+"','id':'1'}";
out.println("{'err':'','msg':"+msg+"}");
//out.println("<script>parent.document.a1.ImgPath.value='" + VirtualObjectPath + saObjectFile[0] + "'</script>");

%>
<script language=javascript>
var obj=parent.EWIN;
try{
obj.addUploadFile("<%= VirtualObjectPath + saObjectFile[0] %>", '<%= VirtualObjectPath + saObjectFile[0] %>');
}
catch(e){}

//2013/08/20 wchen add begin

//2013/08/20 wchen add end
parent.UploadSaved('<%= VirtualObjectPath + saObjectFile[0] %>');

</script>